﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;


namespace WindowsFormsTestApplication
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            Int32 ControlHandle = FlexGraph.FG_createGraphControl((int)GraphContainer.Handle, GraphContainer.Left, GraphContainer.Top, GraphContainer.Width, GraphContainer.Height, Left+8, Top+31);
            Int32 GraphHandle = FlexGraph.FG_addGraph(ControlHandle, "TestGraph");
            for (Int32 i = 0; i < 1000; i++)
            {
                FlexGraph.FG_addPoint(ControlHandle, GraphHandle, i, i*i);
            }
            FlexGraph.FG_setEnableGrid(ControlHandle, true);
            FlexGraph.FG_setDefaultZoom(ControlHandle);
            FlexGraph.FG_requestRedraw(ControlHandle);
        }
    }
}
